<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-back-button defaultHref="tabs/tab2" text="返回"></ion-back-button>
        </ion-buttons>
        <ion-title>b04</ion-title>
    </ion-toolbar>
</ion-header>

<ion-content padding>

  <ion-card id="card">
    <ion-card-content>
      <ion-text color="secondary">
        <p style='color:#ff0000'>ngFor基本用法</p>
        <p>所有学生</p>
        <div *ngFor="let student of students">
          {{student}}
          <br>
        </div>
      </ion-text>
    </ion-card-content>
  </ion-card>
  <ion-card id="card">
    <ion-card-content>
      <ion-text color="secondary">
        <p style='color:#ff0000'>ngIf基本用法</p>
        <div *ngIf='age'>
          张三的年龄为： {{age}}
        </div>
        <div *ngIf='grade'>
          张三的成绩为： {{grade}}
        </div>
      </ion-text>
    </ion-card-content>
  </ion-card>

</ion-content>
